<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<title>iScroll iPad example</title>
          <link rel="stylesheet" href="css/style.css">
  <script src="js/libs/jquery-1.7.1.min.js"></script>        
<script type="text/javascript" src="js/iscroll.js"></script>
<script src="phonegap-1.2.0.js" charset="utf-8"></script>


<script type="text/javascript">
var scrollContent;
var scrollContent2;
var scrollSide;

function loaded() {
    scrollContent = new iScroll('contentScroller');
    scrollSide = new iScroll('navScroller');
}

document.addEventListener('touchmove', function(e){ e.preventDefault(); }, false);
document.addEventListener('DOMContentLoaded', loaded, false);
</script>
<script>
                  var webdir='http://www.theidea.in.th/thaiheathadmin';
                  $(document).ready(function() {
                       $('#commentform').submit(
                       function() 
                       {
                       if($('#ftitle').val()=="")
                        {
                            alert('กรุณากรอกหัวข้อ');
                            return false;
                        }     
                        if($('#fdetail').val()=="")
                        {
                            alert('กรุณากรอกรายละเอียด');
                            return false;
                        } 
                        
 
                           
                           
                        $.post(webdir+'/ajax.php',{functioncall:'addtopic',uid:localStorage.getItem("uid"),fdetail:$('#fdetail').val(),ftitle:$('#ftitle').val()} ,function(data) {
                                              var myObject = eval('(' + data + ')');
                                              if(myObject.error==0)
                                              {
                                                  alert('เพิ่ม Forum เรียบร้อยแล้ว');
                                                  location.href="forum-detail.html?foid="+myObject.foid;
                                                  return false;
                                              }else
                                              {
                                                  alert('เกิดข้อผิดพลาด');
                                                  return false;
                                              }
                                              
                        });
                          
                       return false;
                       }
                       );
                      
                  });
 </script>
 <script>
   function addpic()
  {
      
      
  }
 </script>

<link rel="stylesheet" href="css/iscroll.css"> 
<link rel="stylesheet" href="css/login.css"> 



</head>
<body>

<div id="page">
    <div id="sidebar">
        <header>Menu</header>
        <nav>
                            <a href="javascript:void(0);"><img onclick="addpic()" src="images/img-avatar.jpg" alt="img-avatar" /></a>
           <h3>Feature</h3>
           <ul id="navScroller" class="v">
                       <li><a href="forum.html" class="icon">Forum</a></li>
                      <li><a href="index.html" class="icon">Calendar</a></li>
                      <li><a href="message.html" class="icon">Private Message</a></li>
                      <li><a href="meetingroom.html" class="icon">Meeting Room</a></li>
                      <li><a href="download.html" class="icon">Document Download</a></li>
                      <li><a href="logout.html" class="icon">Log Out</a></li>
                  </ul>
        </nav>
    </div>

    <div id="content">
        <header>เพิ่ม Forum</header>
        <article>
        
            <div id="contentScroller" class="clearfix">
                      <div id="comment">

                      
                      
                      
    
                      
                      
                      

                         <div id="respond" style="padding:0">


                                        
                                        
                                        <form id="commentform" name="commentform" method="post" action="">
 
                                        <p>&nbsp;&nbsp;<strong>หัวข้อ</strong><input type="text"  id="ftitle" name="ftitle" style="width: 75%; margin-left: 40px;"></p>
                                        <p>&nbsp;&nbsp;<strong>รายละเอียด</strong><textarea tabindex="4" rows="10" cols="100%" id="fdetail" style="margin-left: 10px;" name="fdetail"></textarea></p>
                                        
                                        <p style="float: right; margin-right: 90px;"><input type="submit" value="Send" tabindex="5" id="submit" name="submit">

                                        </p>
                                        
                                        </form>
                                        
                                        </div>
                            
                            
                      </div>                    
            </div>
            

        </article>
    </div>
</div>
<script src="js/default/login.js"></script>

</body>
</html>